<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<body>
<script type="text/html" id="toolbarDemo">
	<div class="layui-btn-container">
		<button class="layui-btn layui-btn-sm" lay-event="add_panel">新增</button>
  	</div>
</script>
	<table class="layui-hide" id="management" lay-filter="tbCurriculum"></table>
	
	<script type="text/javascript">
		var option={
			elem:'#management',
			title:'班务管理',
			path:'management',
			addurl:'edit',
			toolbar:'#toolbarDemo',
			cols: [[
				{field: 'id', title: 'ID', hide: true, usersize: true, sort: true},
				{field: 'tbClass', title: '班级', templet: function(d){
					return d.tbClass?d.tbClass.name: '';
				}},
				{field: 'time', title: '时间'},
				{field: 'student', title: '记录人', templet: function(d){
					return d.student?d.student.name: '';
				}},
				{field: 'learndiscipline', title: '学习情况'},
				{field: 'workdiscipline', title: '班委会工作情况'},
				{field: 'recommendation', title: '意见'},
				{field: 'trecommend', title: '班主任建议'},
				{fixed: 'right', title:'操作', toolbar: '#barDemo2', width:200}
			]] 
		}
		var currRow="${param.currRow==null?'null':param.currRow}";
		var limit=${param.limit==null?'null':param.limit};
		var page=${param.page==null?'null':param.page};
		var classTable=new LayUiTable(option,currRow,limit,page);
		classTable.init();
	</script>
</body>
